<?php SQLFile::start() ?>SELECT count(*)FROM( exam_session_question esq INNER JOIN exam_question eq USING (exam_question_id) )WHERE eq.correct_choice = esq.answer_choiceAND esq.exam_session_id = :id<?php return SQLFile::end();